# _*_ coding : utf-8 _*_
# @Time : 2022/1/11 19:12
# @Author : 01.requests.py
# @Project : 小猿圈爬虫--爬取搜狗首页页面数据


import requests
if __name__ == '__main__':
    #step1 指定url
    url = 'https://www.sogou.com/'
    #step2 发起请求
    response = requests.get(url=url)
    #step3 获取响应数据
    page_text = response.text
    print(page_text)
    #step4 持久化存储
    with open('./sogou.html','w',encoding = 'utf-8') as fp:
        fp.write(page_text)
    print('爬取结束！！！')